<template>
    <view class="video-view" @tag="navigateBack">
        <view class="video-view-1">
            <uv-swiper :list="videos" :current="index" circular :autoplay="false" vertical height="100vh"
                bgColor="#000000">
            </uv-swiper>
        </view>

    </view>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { onShow } from '@dcloudio/uni-app';

const getSec = ref('')
const videos = ref<string[]>([])
const index = ref(0)
onShow(() => {
    getSec.value = uni.getStorageSync('videokey')
    videos.value = uni.getStorageSync('videolist')
    index.value = videos.value.findIndex(c => c === getSec.value)
})

function navigateBack() {
    uni.navigateBack()
}





</script>
<style scoped lang="scss">
.video-view {
    width: 100vw;
    height: 100vh;
    background-color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    justify-content: center;

    .video-view-1 {
        width: 100vw;
        height: 100vh;
    }
}
</style>